<template>
  <div class="addAdress">
    <nav-top title="修改地址"
             :goback="true"></nav-top>

    <div class="area"
         @click="show = true">
      <span>
        所在地区
      </span>
      <van-icon style="float:right"
                name="arrow" />
    </div>
    <div class="gap"></div>
    <div class='addressDetail'>
      <span>详细地址</span>
      <van-field class='textarea'
                 v-model="addressDetail"
                 type='textarea'
                 placeholder="请输入详细地址">
      </van-field>
    </div>

    <van-popup v-model="show"
               position="bottom">
      <van-area :area-list="areaList"
                @confirm='confirm'
                @cancel="show=false" />
    </van-popup>
    <div class="opera">
      <button @click="confirmAddress">确定修改</button>
    </div>

  </div>
</template>

<script>
import NavTop from "@/components/nav/navBar";
import areaList from '@/common/area';
export default {
  components: {
    NavTop
  },
  data () {
    return {
      areaList,
      selectArea: [],
      addressDetail: '',
      show: false
    }
  },
  mounted () {
  },
  methods: {
    confirm (val) {
      this.selectArea = val;
      this.show = false
    },
    confirmAddress () {

    }
  }
}
</script>

 <style lang="scss" scoped>
.addAdress {
  .area {
    height: 40px;
    width: 320px;
    margin-top: 48px;
    span {
      padding-left: 11px;
      font-size: 13px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(33, 33, 33, 1);
      line-height: 40px;
    }
    i:before {
      padding-right: 13px;
      line-height: 40px;
      color: #cdcdcd;
    }
  }
  .gap {
    width: 319px;
    height: 4px;
    background: #f5f5f5;
  }
  .addressDetail {
    width: 297px;
    height: 160px;
    margin: 0 auto;
    span {
      font-size: 13px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(33, 33, 33, 1);
      line-height: 47px;
    }
    .textarea {
      padding: 0;
      width: 297px;
      height: 113px;
      background: #f5f5f5;
      textarea {
        ::-webkit-input-placeholder {
          padding: 12px 0 0 11px;
          font-size: 11px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: rgba(162, 162, 162, 1);
        }
      }
    }
  }
  .opera {
    margin: 180px auto;
    text-align: center;
    button {
      width: 297px;
      height: 41px;
      background: #06a44f;
      border: none;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(255, 255, 255, 1);
    }
  }
}
// .addAdress .van-button {
//   position: fixed;
//   bottom: 43px;
//   left: 34px;
//   width: 256px;
//   background: rgba(23, 184, 91, 1);
//   border-radius: 4px;
//   border: none;
// }
</style>
<style>
.addAdress .addressDetail .textarea .van-field__control {
  padding: 12px 0 0 11px;
  font-size: 11px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: rgba(162, 162, 162, 1);
}
</style>